package com.mtw.bbs.reply.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mtw.bbs.reply.pojo.entity.ReplyInfo;
import jakarta.validation.constraints.NotNull;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;

@Mapper
public interface ReplyInfoMapper extends BaseMapper<ReplyInfo> {


    /**
     * 更新点赞数量
     *
     * @param countNumber 变化量
     * @param id          评论id
     */
    int updateLikeCount(@NotNull @Param("countNumber") Integer countNumber, @Param("id") String id);


    /**
     * 更新评论数量
     *
     * @param countNumber 变化量
     * @param idList      评论id集合
     */
    int updateReplyCount(@NotNull @Param("countNumber") Integer countNumber, @Param("coll") Collection<?> idList);




}
